package com.ybwh.springboot2.satoken.auth;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.stereotype.Component;

/**
 * <p>
 *
 * </p>
 *
 * @author fanbeibei
 * @version 1.0.0
 * @date 2025/4/15 11:46
 */
@Slf4j
@Aspect
@Component
public class AuthDataCheckAop {
    @Around(value = "@annotation(com.ybwh.springboot2.satoken.auth.AuthDataCheck)")
    public Object execute(ProceedingJoinPoint joinPoint) throws Throwable {

        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
        AuthDataCheck authDataCheck = signature.getMethod().getAnnotation(AuthDataCheck.class);


        return joinPoint.proceed();
    }

}
